how to flash a window properly